#define GPFCON (*(volatile unsigned long *)0x56000050)
#define GPFDAT (*(volatile unsigned long *)0x56000054)

void delay(volatile int d)
{
    while (d--)
        ;
}

int led_on(int which)
{

    if (which == 4)
    {
        /* 配置 GPF4 为输出引脚 */
        GPFCON = 0x100;
    }
    else if (which == 5)
    {
        /* 配置 GPF5 为输出引脚 */
        GPFCON = 0x400;
    }

    GPFDAT = 0;

    return 0;
}